package com.iotstudio.embeddedcloudplatform.dao;

import com.iotstudio.embeddedcloudplatform.POJO.DO.Sensor;
import com.iotstudio.embeddedcloudplatform.POJO.DO.SensorData;
import com.iotstudio.embeddedcloudplatform.POJO.DO.SensorDataType;
import com.iotstudio.embeddedcloudplatform.POJO.DO.UserSensor;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface SensorMapper {

    int addUserSensor(UserSensor userSensor);

    String selectById(String sensorId);

    int addSensor(Sensor sensor);

    int addData(SensorData sensorData);

    int addDataType(SensorDataType sensorDataType);

    String selectByName(String name);

    int deleteById(String id);

    int deleteBySensorId(String sensorId);

    int deleteByName(String name);

    List selectDataUtil(@Param("id")String sensor_id,@Param("time1")String time1, @Param("time2")String time2);

    Sensor selectOne(String sensorId);

    List<SensorData> selectAll(@Param(value="sensorId")String sensorId,@Param(value="time")String time);
}
